using System.Windows;

namespace ASPItalia.ModelVirtualCasting.WPF.DragDrop
{
    /// <summary>
    /// Interface to rappresent source drag'n'drop manager
    /// </summary>
    public interface IDragSourceAdvisor
    {
        /// <summary>
        /// Get or set the source drag'n'drop operation
        /// </summary>
        UIElement SourceUI { get; set; }
        /// <summary>
        /// Get the effects (copy, move, ...) supported by this source
        /// </summary>
        DragDropEffects SupportedEffects { get; }
        /// <summary>
        /// Get the clipboard data to transfer from source to target
        /// </summary>
        /// <param name="draggedElt">Start dragging element</param>
        /// <param name="offsetPoint">Start dragging mouse position</param>
        /// <returns></returns>
        DataObject GetDataObject(UIElement draggedElt, Point offsetPoint);
        /// <summary>
        /// Called when drag'n'drop operation is finished
        /// </summary>
        /// <param name="draggedElt"></param>
        /// <param name="finalEffects"></param>
        void FinishDrag(UIElement draggedElt, DragDropEffects finalEffects);
        /// <summary>
        /// Get if the start dragging element is valid for drag'n'drop operation
        /// </summary>
        /// <param name="draggedElt"></param>
        /// <returns></returns>
        bool IsDraggable(UIElement draggedElt);
    }
}